﻿using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Transformable_Engine_v2.Engine.Global
{
    public class GameProperties
    {
        public GameProperties()
        {
            GridSize = 0;
            ScreenSize = TE_Vector2.Zero;
            Title = "Title not set";
            IconPath = null;
            Style = WindowStyle.Windowed;
            BackgroundColor = Color.Black;
            ShowGrid = false;
            MouseEnabled = false;
            KeyboardEnabled = false;
            GamepadEnabled = false;
            TargetFps = 30;
            UpdateSleepTime = 10;
        }

        public int GridSize { get; set; }

        public TE_Vector2 ScreenSize { get; set; }

        public string Title { get; set; }
        public string IconPath { get; set; }

        public bool MouseEnabled { get; set; }
        public bool KeyboardEnabled { get; set; }
        public bool GamepadEnabled { get; set; }

        /// <summary>
        /// Types of window display
        /// </summary>
        public enum WindowStyle
        {
            /// <summary>
            /// No window border
            /// </summary>
            None = 0,
            /// <summary>
            /// Icon and title
            /// </summary>
            Titlebar = 1 << 0,
            /// <summary>
            /// Resizable window
            /// </summary>
            Resize = 1 << 1,
            /// <summary>
            /// Window with a close button
            /// </summary>
            Close = 1 << 2,
            /// <summary>
            /// Fullscreen window
            /// </summary>
            Fullscreen = 1 << 3 ,
            /// <summary>
            /// Window with an icon and a close button
            /// </summary>
            Windowed = Titlebar | Close
        }
        public WindowStyle Style { get; set; }

        public Color BackgroundColor { get; set; }

        public bool ShowGrid { get; set; }

        /// <summary>
        /// Target drawing fps. Default is 30
        /// </summary>
        public double TargetFps { get; set; }

        /// <summary>
        /// Sleep time between frames, in milliseconds. Default is 10
        /// </summary>
        public int UpdateSleepTime { get; set; }
    }
}